﻿using DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BussinessLogic
{
    public class BLAdmin
    {
        private DAAdmins AdminRepository = new DAAdmins();

        public Admin GetAdmin(string username, string password)
        {
            return AdminRepository.GetAdmin(username, password);
        }

        public bool Update(Admin admin)
        {
            return AdminRepository.Update(admin);
        }

        public object GetAdmins(int CurrentPage, int CurrentSize, out int TotalPages)
        {
            return AdminRepository.GetAdmins(CurrentPage, CurrentSize, out TotalPages);
        }

        public Admin GetAdmin(int adminId)
        {
            return AdminRepository.GetAdmin(adminId);
        }

        public bool Insert(Admin admin)
        {
            return AdminRepository.Insert(admin);
        }

        public bool DeleteAdmin(int adminId)
        {
            return AdminRepository.Delete(adminId);
        }
    }
}